import service from '@/utils/request'

// 获取数据
export const getData = (params) => {
    return service({
        method: 'get',
        url: '/getData',
        params
    })
}

export const addData = (data) => {
    return service({
        method: 'post',
        url: '/addData',
        data
    })
}

export const editData = (data) => {
    return service({
        method: 'post',
        url: '/editData',
        data
    })
}

export const deleteData = (data) => {
    return service({
        method: 'post',
        url: '/deleteData',
        data
    })
}

export const exportData = (data) => {
    return service({
        method: 'post',
        url: '/exportData',
        responseType: 'blob',
        data
    })
}

export const downloadTemplate = () => {
    return service({
        method: 'get',
        url: '/downloadTemplate',
        responseType: 'blob',

    })
}

